import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/component/Layout'
import Home from '@/views/Home'
import Notice from '@/views/Notice'
import NoticeDetail from '@/views/NoticeDetail'
import About from '@/views/About'
import ProjectDetail from '@/views/ProjectDetail'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: Layout,
    redirect: '/Home',
    children: [
      { path: '/Home', component: Home },
      { path: '/Notice', component: Notice },
      { path: '/NoticeDetail', component: NoticeDetail },
      { path: '/About', component: About },
      { path: '/ProjectDetail', component: ProjectDetail }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
